# coding:utf-8
class Position(object):
    def __init__(self, lo, la):
        """lo for longitude"""
        """la for latitude"""
        """不支持跨纬度、经度分界线"""
        """排序按照从北到南（即纬度大小反过来），从西到东（经度大小）"""
        self.la = la
        self.lo = lo

    def __eq__(self, position2):
        return (self.la == position2.la and self.lo == position2.lo)

    def __ne__(self, position2):
        return (self.la != position2.la or self.lo != position2.lo)

    def __gt__(self, position2):
        return (self.la < position2.la) or (self.la == position2.la and self.lo > position2.lo)

    def __lt__(self, position2):
        return (self.la > position2.la) or (self.la == position2.la and self.lo < position2.lo)

    def __le__(self, position2):
        return ((self.la > position2.la) or (self.la == position2.la and self.lo < position2.lo) or
                (self.la == position2.la and self.lo == position2.lo))

    def __ge__(self, position2):
        return ((self.la < position2.la) or (self.la == position2.la and self.lo > position2.lo) or
                (self.la == position2.la and self.lo == position2.lo))

    def __str__(self):
        return str(self.la) + ', ' + str(self.lo)

    def dist(self, position2):
        return (abs(self.la - position2.la) + abs(self.lo - position2.lo))

    def in_region(self, left_up, right_down):
        return (self.la <= left_up.la and self.la >= right_down.la) and (self.lo >= left_up.lo and self.lo <= right_down.lo)


if __name__ == '__main__':
    a = "1 1"
    a = a.split()
    print(a)
